package com.devilvan.grouping;

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Partitioner;

public class GroupingPartitioner extends Partitioner<OrderBean, Text> {
    @Override
    public int getPartition(OrderBean orderBean, Text text, int numPartitions) {
        return orderBean.getOrderId().hashCode() % numPartitions;
    }
}
